﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using VsSpeakerCompanion;
using TwitterAPI;
using Microsoft.VisualStudio.Text.Editor;
using VsSpeakerCompanion.UI;

namespace TwitterThisWidget
{
    [Export(typeof(IWidgetProvider))]
    [Widget(Name = "Twitter This Widget", After = "Sound Snippet Widget")]
    internal class WidgetProvider : IWidgetProvider
    {
        [Import]
        private TwitterService TwitterService { get; set; }

        [Import]
        private IUIService UIService { get; set; }

        [Import]
        private IVisualStudioService VisualStudioService { get; set; }

        IEnumerable<IWidget> IWidgetProvider.GetWidgets(Context context)
        {
            // create a TweetThis widget and pass along the three services it will be using
            Widget widget = new Widget(TwitterService, this.VisualStudioService, this.UIService);

            return new List<IWidget> { widget };
        }
    }
}
